# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Contributor: Antoine Fontaine <antoine.fontaine@epfl.ch>
# Maintainer:
pkgname=py3-multidict
_pkgname=multidict
pkgver=6.0.4
pkgrel=2
pkgdesc="multidict implementation"
url="https://github.com/aio-libs/multidict/"
arch="all"
license="Apache-2.0"
depends="python3"
checkdepends="py3-pytest py3-pytest-cov"
makedepends="py3-gpep517 python3-dev py3-setuptools cython py3-wheel"
subpackages="$pkgname-pyc"
source="$_pkgname-$pkgver.tar.gz::https://github.com/aio-libs/multidict/archive/v$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
6f9e6ff16a104d40b0cb59860af9cb1a98e8d3a256626f77600c4895e6ef692b31880273f204e7ecdeb574407dd7c2e4326ad7cd9c08b1095011d6ba3793b86e  multidict-6.0.4.tar.gz
"
